<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="../admin/authority.jsp" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@include file="headScriptCR.jsp"%>
<script type="text/javascript" src="${pageContext.request.contextPath}/assets/js/cr/cs21002script.js">   
</script>

</head>
<body>
	<div class="wrapper">
		<!-- BEGIN Top-Bar -->
		<%@ include file="../fragments/header.jsp"%>
		<!-- END Top-Bar -->

		<div id="detail-area" class="clearfix">
			<!-- BEGIN SIDEMENU -->
			<div class="hidden-xs hidden-sm page-sidebar" id="side-menu-bar">
				<ul class="page-sidebar-menu">					

					<!-- <div id="displaymenu"></div>  -->
					<%@ include file="../admin/menu.jsp" %>

				</ul>
			</div>
			<!-- End Side Menu -->

			<div class="col-sm-12 col-xs-12" id="right-side">
				<div id="navigator-bar"><i class="fa fa-home"></i> หน้าหลัก <i class="fa fa-angle-right ml-5 mr-5"></i> นำเข้าข้อมูลผู้ใช้น้ำ</div>
				<!--End navigator-bar-->			
<!-- ---------------------------------------------------------------------------------- -->
				<!-- Start detail-area -->
				<div>
					<div id="page-header" class="clearfix">
					  <div>นำเข้าข้อมูลผู้ใช้น้ำ</div>
					</div>
				<div id="success_message" class="alert alert-success hide"> <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-check fa-stack-1x fa-inverse"></i> </span> ${message_success} </div>
				<div id="error_message" class="alert alert-danger hide"> <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-times fa-stack-1x fa-inverse"></i> </span> ${message_error} </div>
			<!-- Start detail-area -->
			<div>
				<!-- Start form-detail -->
				<div class="form-detail clearfix">
					
						<div class="search-box  no-radius">
							<div class="form-group clearfix search-header no-radius">
								<div class="pull-left">ระบุการอัพโหลดข้อมูลผู้ใช้น้ำ</div>
								<div class="pull-right">
									<div id="hide-button"><i class="fa fa-chevron-circle-up "></i></div>
								</div>
							</div>
							<div id="box-body">
				  			
					  			<div class="form-group clearfix mt-10 ">

						  			<div class="form-group">
										<div class="col-sm-12 mt-5">
										
										
										<form id="UploadFileImage" method="post" enctype="multipart/form-data"  action="../sm/CS11013Srvl">									
											
											<div class="col-sm-4 mt-5" align="right">
														<label>เลือกข้อมูลผู้ใช้น้ำ</label>
													</div>
													<div class="col-sm-8 mt-5"
														onclick="document.getElementById('btnFile').click();">
														<input id="btnFile" name="files" type="file" style="display: none;"
															onchange="document.getElementById('file').value=this.value.substring(this.value.lastIndexOf('\\')+1);">
														<input id="file" type="text" name="fileImage" style="width: 200px;"
															disabled="disabled">
														<input type="button" class="btn btn-primary"
															value="เลือกไฟล์" />
													</div>
										</form>

										</div>
						  			</div>
					  			</div>
				  			
								<div class="form-group mt-20 clearfix search-footer no-radius">
									<div class="col-sm-12 text-center">
										<button  onclick="SaveFile()" type="button" id="saveReader" class="btn btn-primary"><i class="fa fa-floppy-o"></i> อัพโหลดข้อมูลผู้ใช้น้ำ</button>
									</div>
								</div>
							</div>
							<!-- END BOX-BODY -->
						</div>
				</div>
				<!-- End detail-area -->
				<div class="form-detail clearfix" style="margin-top:-10px;padding-top: 0px;">
				
					<div class="modal fade" id="confirmSaveModal" tabindex="-1" role="dialog" aria-labelledby="confirmModal" aria-hidden="true">
				    <div class="modal-dialog">
				        <div class="modal-content">
				            <div class="modal-header">
				            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				            <h4 class="modal-title">ยืนยันการอัพโหลดข้อมูลผู้ใช้น้ำ</h4>
				            </div>
				            <div class="modal-body">
				            	<div id="modal_content_confirmSaveModal"></div>
				            </div>
				            <div class="modal-footer">
				                <button onclick="cancel()"  type="button" class="btn btn-danger" data-dismiss="modal">ยกเลิก</button>
				                <button onclick="addDataTable()" type="button"  class="btn btn-primary">ยืนยันการบันทึกข้อมูล</button>
				        	</div>
				    	</div>
				  	</div>
				</div>
				
				<div class="modal fade" id="warningModal" tabindex="-1" role="dialog" aria-labelledby="warningModal" aria-hidden="true">
			  	  <div class="modal-dialog">
			        <div class="modal-content">
			            <div class="modal-header">
			            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			            <h4 class="modal-title">กรุณากรอกข้อมูลให้ถูกต้อง</h4>
			            </div>
			            <div class="modal-body">
			            	<div id="modal_content"></div>
			            </div>
			            <div class="modal-footer">
			                <button type="button" class="btn btn-danger" data-dismiss="modal">ยกเลิก</button>    
			        	</div>
			    	</div>
			  	</div>
			</div>
			
			<div class="modal fade" id="warningNumModal" tabindex="-1" role="dialog" aria-labelledby="warningModal" aria-hidden="true">
			  	  <div class="modal-dialog">
			        <div class="modal-content">
			            <div class="modal-header">
			            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			            <h4 class="modal-title">กรุณากรอกข้อมูลให้ถูกต้อง</h4>
			            </div>
			            <div class="modal-body">
			            	<div id="modal_numcontent"></div>
			            </div>
			            <div class="modal-footer">
			                <button type="button" class="btn btn-danger" data-dismiss="modal">ยกเลิก</button>    
			        	</div>
			    	</div>
			  	</div>
			</div>
			</div>
			<div id="footer-detail">Copyright © สงวนลิขสิทธิ์ พ.ศ.2557 โดย การประปานครหลวง</div>
		
			</div>
			<!-- End detail-area -->
			
		</div>	
				</div>
				</div>
	</div>
</body>
</html>